home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / CTools 2.2.1d / CTools / CTools.rsrc / TEXT_145_Complete Trans..txt < prev    next >
Encoding:
Text File  |  1995-12-01  |  1.9 KB  |  31 lines

  1. Getting A Complete Translation
  2.  
  3. Sometimes CTools‚Ñ¢ does not completely translate a file with the CTools‚Ñ¢ Pascal to C function.  Errors in getting a complete output can be worked around.  If you run Pascal to C, scroll down the output window to the bottom.  If there are no translation errors you will see ‚Äú}.‚Äú there.  If not, there was an abnormal termination of the translation due to something CTools‚Ñ¢ is not yet made able to handle.
  4.  
  5. Abnormal terminations are caused by:
  6. (1) More than 32 variables being assigned to one type declaration.
  7.     Solution:  Split them up.
  8. (2) An array declared with a byte range (i.e. ‚Äú0..255‚Äù), including the
  9.         ‚Äúpacked‚Äù Pascal keyword.
  10.     Solution:  Change it before translating.
  11. (3) Any wrong Pascal source, such as seen in a "Rascal" file, such as void procedures which have parens, or some such.
  12.     Solution:  Correct them.
  13. (4) It seems to balk at the word ‚ÄúImplementation‚Äù.
  14.     Solution: Comment it out.
  15.  
  16. If an abnormal termination has happened, simply:
  17.  
  18. (1 ) Note WHERE in the Pascal file the translation stopped.
  19. (2 ) CLOSE AND DO NOT SAVE the translation.
  20. (3 ) Scroll down the open, original Pascal window to that place.
  21. (4 ) Comment out or otherwise correct the erring line.
  22. (5 ) Attempt another complete translation.
  23. (6a) If complete, save and close the translation.
  24. (6b) If incomplete, repeat steps 2 through 6.
  25. (7 ) Close and do not save the original Pascal file.
  26.  
  27. Another form of incomplete translation, where it does not abnormally terminate, yet does not properly translate, are when the word ‚Äúpacked‚Äù is read in a type definition.
  28.  
  29. So, before you even try to translate the file, to save time and trouble, it would be wise to pre-edit the Pascal file (a copy) and remove all occurrences of the word ‚Äúpacked‚Äù and change any range variables to the Pascal version of what they will end up being (i.e. change ‚Äú0..255‚Äù to ‚Äúinteger‚Äù).
  30.  
  31.